<?php
if(!$_SESSION['memberID']){
    header("Location:dlogin.html");
    exit;
}
include_once('../common/autoload.php');
$tplid=intval($_REQUEST["tplid"]);
$tpl=Tpl::getLink();
if(is_array(($res=$tpl->getTpl($tplid)))){
	$res=$res["tid"]?array_combine(explode("|",$res["tid"]),explode("|",$res["price"])):array();
	echo json_encode($res);
}
else{
	echo $res;
}
?>